home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / smail-3.1.28 / src / bindlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-11  |  2.6 KB  |  63 lines

  1. /* @(#)src/bindlib.h    1.4 7/11/92 11:47:58 */
  2.  
  3. /*
  4.  *    Copyright (C) 1992  Ronald S. Karr
  5.  *
  6.  * BIND support common to the "bind" router and the "tcpsmtp" transport.
  7.  * Created by Simon Leinen (simon@liasun6) on 9 July 1991.
  8.  *
  9.  * Converted to library form usable by tcpsmtp by Chip Salzenberg.
  10.  */
  11.  
  12. #ifndef BINDLIB_H
  13. #define BINDLIB_H
  14.  
  15. /* configuration items shared by bind router and tcpip transport */
  16.  
  17. /* flag attributes */
  18. #define BIND_LOCAL_MX_OKAY   0x01000000    /* MX RR can point to local host */
  19. #define BIND_DEFER_NO_CONN   0x02000000    /* defer if cannot connect to server */
  20. #define BIND_DEFNAMES        0x04000000    /* append default domain name */
  21. #define BIND_DOMAIN_REQUIRED 0x08000000    /* require two hostname parts */
  22. #define BIND_MX_ONLY         0x10000000    /* require MX records */
  23. #define BIND_UK_TRY_INVERT   0x20000000 /* try inverting UK address */
  24. #define BIND_UK_GREY_WORLD   0x40000000 /* UK GreyBook addrs in world order */
  25.  
  26. struct bindlib_private {
  27.     char *ignore_domains;        /* domains to ignore */
  28.     char *widen_domains;        /* domains to try widening with */
  29.     char *gateways;            /* known gateways and their domains */
  30.     char *uk_ignore_gateways;        /* UK: gateways to ignore */
  31.     char *uk_greybook_transport;    /* UK: null string => SMTP only */
  32.     int  uk_max_precedence;        /* UK: max MX precedence to accept */
  33. };
  34.  
  35. /* configuration description */
  36. #define BIND_ATTRIBUTES(STRUCT,BL_PRIV_MEM) \
  37.     { "local_mx_okay", t_boolean, NULL, NULL, BIND_LOCAL_MX_OKAY },    \
  38.     { "defer_no_connect", t_boolean, NULL, NULL, BIND_DEFER_NO_CONN },    \
  39.     { "defnames", t_boolean, NULL, NULL, BIND_DEFNAMES },        \
  40.     { "domain_required", t_boolean, NULL, NULL, BIND_DOMAIN_REQUIRED },    \
  41.     { "mx_only", t_boolean, NULL, NULL, BIND_MX_ONLY },            \
  42.     { "uk_try_inverting", t_boolean, NULL, NULL, BIND_UK_TRY_INVERT },    \
  43.     { "uk_greybook_worldorder", t_boolean, NULL, NULL, BIND_UK_GREY_WORLD }, \
  44.     { "ignore_domains", t_string, NULL, NULL,                \
  45.       OFFSET(STRUCT, BL_PRIV_MEM.ignore_domains) },            \
  46.     { "widen_domains", t_string, NULL, NULL,                \
  47.           OFFSET(STRUCT, BL_PRIV_MEM.widen_domains) },            \
  48.     { "gateways", t_string, NULL, NULL,                    \
  49.           OFFSET(STRUCT, BL_PRIV_MEM.gateways) },            \
  50.     { "uk_ignore_gateways", t_string, NULL, NULL,            \
  51.           OFFSET(STRUCT, BL_PRIV_MEM.uk_ignore_gateways) },        \
  52.     { "uk_greybook_transport", t_string, NULL, NULL,             \
  53.           OFFSET(STRUCT, BL_PRIV_MEM.uk_greybook_transport) },        \
  54.     { "uk_max_precedence", t_int, NULL, NULL,                \
  55.       OFFSET(STRUCT, BL_PRIV_MEM.uk_max_precedence) }
  56.  
  57. #define BIND_TEMPLATE_FLAGS 0
  58.  
  59. #define BIND_TEMPLATE_ATTRIBUTES \
  60.    { NULL, NULL, NULL, NULL, NULL, 0 }
  61.  
  62. #endif /* not BINDLIB_H */
  63.